<?php require_once('login_check.php')?>




<?php header("Content-type: text/html; charset=utf-8"); ?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<title>nicolajroos.dk CMS</title>

	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js"></script>
	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.js"></script>
	<link rel="stylesheet" type="text/css" href="stylesCms.css" />

	<script src="scriptsCms.js" type="text/javascript" charset="utf-8"></script>
	
</head>

<body>

	<div id="container">
	<h1>nicolajroos.dk CMS</h1>

	
	
		<div id="list">

	    	
		    	<ul>
			      <?php
		                include("connect.php");
						$query  = "SELECT id, filename FROM images ORDER BY listorder ASC";
						$result = mysql_query($query);
						while($row = mysql_fetch_array($result, MYSQL_ASSOC))
						{
							$id = stripslashes($row['id']);
							$filename = stripslashes($row['filename']);
						
						?>
			      		<li class="dragable" id="arrayorder_<?php echo $id ?>">
							<img src="../img/gallery/<?php echo htmlentities($filename) ?>" title='<?php echo htmlentities($filename) ?>'/>
			        	
			      		</li>
			      <?php } ?>
				</ul>
				
		</div> <!-- end #list -->
		<div id="response"><img src="img/save.png"/></div>
		<div id="trashDropArea" class="droppable">
			<img id="trashcan" src="img/trashcan.png"/>
		</div>
		<!-- ############ UPLOAD ########## -->
		<div id="upload">
			<form accept-charset="utf-8" action="upload/upload_file.php" method="post"
				enctype="multipart/form-data">
				<label for="file">Filename:</label>
				<input type="file" name="file" id="file" /><br />
				
				<label for="file">Title:</label><br />
				<input type="text" name="uploadTitle" id="uploadTitle" /><br />
				
				<label for="file">Description:</label><br />
				<input type="text" name="uploadDescription" id="uploadDescription" /><br /><br />

				<input type="submit" name="submit" value="Submit" />
			</form>
		</div><!-- end #upload -->
	</div> <!-- end #container -->
	
</body>
</html>
